package test

func f2(num int) (int, int) {
	length, width := 1, num
	reslen, reswidth := length, width
	for length <= width {
		tmp := length * width
		if tmp == num {
			reslen, reswidth = length, width
			length++
			width--
		} else if tmp > num {
			width--
		} else {
			length++
		}
	}
	return reswidth, reslen
}
